<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: YanHilin
  Date: 2020/5/11
  Time: 13:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>编辑个人基本信息</title>
    <base href="http://localhost:8080/onlineflower/">
    <%@include file="/page/comment/head.jsp"%>
    <link rel="stylesheet" type="text/css" href="static/css/form.css">

</head>
<body>
<%@include file="/page/user/head_nav.jsp"%>

<div id="content">
    <c:if test="${empty sessionScope.user}">
        <%-- <jsp:forward page="/page/user/login.jsp"></jsp:forward>--%>
        hello
    </c:if>
    <c:if test="${not empty sessionScope.user}">
        <%--@declare id="exampleinputemail1"--%>
        <form action="userServlet" method="post">
            <input type="hidden" name="action" value="modifySelfMess">

            <div class="form-group">
                <label for="exampleInputEmail1">昵称</label><span>${requestScope.mess}</span>
                <input type="text" name="pet_name" class="form-control input-lg" value="${sessionScope.user.pet_name}">
            </div>
            <div class="form-group">
                <label for="exampleInputEmail1">姓名</label>
                <input type="text" name="relname" class="form-control input-lg" value="${sessionScope.user.relname}">
            </div>
            <div class="form-group">
                <label for="exampleInputEmail1">性别</label>
                <c:if test="${sessionScope.user.sex==0}">
                    <input type="text" name="sex" class="form-control input-lg" value="男">
                </c:if>
              <%--  <c:if test="${sessionScope.user.sex==null}">
                    <input type="text" name="sex" class="form-control input-lg" value="男">
                </c:if>--%>
                <c:if test="${sessionScope.user.sex==1}">
                    <input type="text" name="sex" class="form-control input-lg" value="女">
                </c:if>
            </div>
            <div class="form-group">
                <label for="exampleInputEmail1">联系方式</label>
                <input type="text" name="telephone" class="form-control input-lg" value="${sessionScope.user.telephone}">
            </div>
            <div class="form-group">
                <label for="exampleInputEmail1">邮政编码</label>
                <input type="text" name="postal_code" class="form-control input-lg" value="${sessionScope.user.postal_code}">
            </div>
            <div class="form-group">
                <label for="exampleInputEmail1">邮寄地址</label>
                <input type="text" name="address" class="form-control input-lg" value="${sessionScope.user.address}">
            </div>
            <button type="submit" class="btn btn-secondary btn-lg btn-block"><span class="glyphicon glyphicon-send"></span>  Submit</button>
        </form>
    </c:if>
</div>
</body>
</html>